<?php 
    require_once './model/articles.php';
    $obj = new Articles();
    $articles =$obj->select();
?>
<div id="sidebar1" class="sidebar">
    <ul>
        <li id="recent-posts">
            <h2>Recent Posts</h2>
            <ul>
                <?php foreach ($articles as $article):?>
                <li>
                    <h3><a href="#"><?php echo $article['title'] ?></a></h3>
                    <p><?php echo $article['overview'] ?></p>
                </li>
                <?php endforeach; ?>
            </ul>
        </li>
        <li></li>
    </ul>
</div><?php

